﻿@model CID.Web.Models.Infrastructure.TemplateTypeViewModel


@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    @Html.HiddenFor(model => model.Id)

    <div class="editor-label">
        @Html.LabelFor(model => model.Name)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Name)
        @Html.ValidationMessageFor(model => model.Name)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.Description)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Description)
        @Html.ValidationMessageFor(model => model.Description)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.TemplateContentEditorConverterType)
    </div>
    <div class="editor-field">
        @Html.DropDownListFor(model => model.TemplateContentEditorConverterType, Model.AvailableTemplateContentEditorConverterTypes.Select(x => new SelectListItem() {Text = x, Value = x, Selected = x.Equals(Model.TemplateContentEditorConverterType) }), "Select...")
        @Html.ValidationMessageFor(model => model.TemplateContentEditorConverterType)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.TemplateContentEditorViewName)
    </div>
    <div class="editor-field">
        @Html.DropDownListFor(model => model.TemplateContentEditorViewName, Model.AvailableTemplateContentEditorViewNames.Select(x => new SelectListItem() {Text = x, Value = x, Selected = x.Equals(Model.TemplateContentEditorViewName) }), "Select...")
        @Html.ValidationMessageFor(model => model.TemplateContentEditorViewName)
    </div>

    <div class="editor-label">
        @Html.LabelFor(model => model.Enabled)
    </div>
    <div class="editor-field">
        @Html.EditorFor(model => model.Enabled)
        @Html.ValidationMessageFor(model => model.Enabled)
    </div>

    <p>
        <input type="submit" value="Save" />
    </p>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
